package com.ruoyi.business.rule.domain;

import com.alibaba.fastjson2.JSONArray;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.business.base.JoBaseEntity;
import lombok.Data;

/**
 * 商机规则对象 jb_opportunity_rules
 *
 * @author ruoyi
 * @date 2024-10-11
 */
@TableName(autoResultMap = true)
@Data
public class JbOpportunityRules extends JoBaseEntity
{
    private static final long serialVersionUID = 1L;

    /**
     * 规则类型（0自动或轮询 1手动 3手动抢单）
     */
    @Excel(name = "规则类型", readConverterExp = "0=自动或轮询,1=手动,3=手动抢单")
    private Long executionType;
    /**
     * 数据类型 1=线上部门小组分配2=线上渠道公共商机3=线下渠道公共商机
     */
    @Excel(name = "数据类型", readConverterExp = "数据类型1=线上部门小组分配2=线上渠道公共商机3=线下渠道公共商机")
    private Integer dataType;

    /**
     * 编码
     * online_public_opportunity=线上公共商机
     * online_deptteam_opportunity=线上部门小组商机
     * offline_opportunity=线下商机
     */
    @Excel(name = "编码")
    private String rulesCod;

    /**
     * 部门id
     */
    @Excel(name = "部门id")
    private Long deptId;

    /**
     * 规则内容
     */
    @Excel(name = "规则内容")
    @TableField(typeHandler = JacksonTypeHandler.class)
    private JSONArray executionContent;

    /**
     * 状态（0正常 1停用）
     */
    @Excel(name = "状态", readConverterExp = "0=正常,1=停用")
    private Long status;
}
